export function screenSize(editorDom) {
  function updateScale() {
    let screenWidth = document.body.clientWidth || document.documentElement.clientWidth;
    let screenHeight = document.body.clientHeight || document.documentElement.clientHeight;
    let defWidth = 1920;
    let defHeight = 1080;
    let xScale = screenWidth / defWidth;
    let yScale = screenHeight / defHeight;
    editorDom.style.transform = 'scale(' + xScale + ',' + yScale + ')';
  }

  // 初始化缩放
  updateScale();

  // 响应窗口大小变化
  $(window).resize(updateScale);
}
